﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Budget
{
    public partial class QueryExec : Form
    {
        public QueryExec()
        {
            InitializeComponent();
            lblStatus.Text = "";
        }

        private void btnExecQuery_Click(object sender, EventArgs e)
        {
            try
            {
                string query = textBox1.Text.Replace("\r\n", "");
                DatabaseQuery.ExecStringProcNoReturn(query);
                lblStatus.Text = "Executed Successfully";
            }
            catch(Exception ex)
            {
                lblStatus.Text = ex.Message;
            }
        }
        
    }
}
